import config from 'react-native-config';
import {request} from './request/request';
import {DevSettings} from "react-native";

export const initialize = () => {
    DevSettings.addMenuItem('Debug', () => {
        DevSettings.reload();
    });
    let url = config.BASE_URL;
    if (__DEV__) {
        url = config.DEBUG_URL;
    }
    if (!url.endsWith("/")) {
        url = url + "/";
    }
    request.HOST = url;
};